package beantoxml;

import lombok.Data;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Date;

@Data
@XmlAccessorType(XmlAccessType.FIELD)
public class Course {

    @XmlElement(name = "Id")
    String id;

    @XmlElement(name = "Url")
    @XmlJavaTypeAdapter(EncodeAdapter.class)
    String url;

    @XmlElement(name = "date")
    @XmlJavaTypeAdapter(DateAdapter.class)
    Date date;

}

